<template>
   <!-- 商品分类导航 -->
        <div class="type-nav">
            <div class="container">
                <div >
                     <h2 class="all">全部商品分类</h2>
                     <transition name="sort">
                     </transition>
                </div>
                <nav class="nav">
                    <a href="###">5·20</a>
                    <a href="###">3折疯抢</a>
                    <a href="###">唯品快抢</a>
                    <a href="###">唯品奥莱</a>
                    <a href="###">品牌清仓</a>
                    <a href="###">女装</a>
                    <a href="###">鞋包</a>
                    <a href="###">美妆</a>
                    <a href="###">运动</a>
                    <a href="###">母婴</a>
                    <a href="###">电器</a>
                    <a href="###">更多</a>
                </nav>
               
            </div>
        </div>
</template>

<script>
export default {
  name: 'TypeNav',
}
</script>

<style lang="less" scoped>
  .type-nav {
        border-bottom: 2px solid #f10180;

        .container {
            width: 1200px;
            margin: 0 auto;
            display: flex;
            position: relative;

            .all {
                width: 210px;
                height: 45px;
                background-color: #f10180;
                line-height: 45px;
                text-align: center;
                color: #fff;
                font-size: 14px;
                font-weight: bold;
            }

            .nav {
                a {
                    height: 30px;
                    // margin: 0 16px;
                    line-height: 45px;
                    font-size: 16px;
                    color: #333;
                    text-decoration:none;
                    // display: block;
                    padding: 0 16px;
                     text-align: center;
                    white-space: nowrap;
                }
                a:hover {
                   color:#f10180;
                }
            }

            .sort {
                position: absolute;
                left: 0;
                top: 45px;
                width: 210px;
                height: 461px;
                position: absolute;
                background: #fafafa;
                z-index: 999;

                  &.sort-enter {
                    opacity: 0;
                    height: 0;
                }

                &.sort-enter-to {
                    opacity: 1;
                    height: 461px;
                }

                &.sort-enter-active {
                    transition: all 0.5s;
                }

                .all-sort-list2 {
                    .item {
                        h3 {
                            line-height: 30px;
                            font-size: 14px;
                            font-weight: 400;
                            overflow: hidden;
                            padding: 0 20px;
                            margin: 0;

                            a {
                                color: #333;
                            }
                        }

                        .item-list {
                            display: none;
                            position: absolute;
                            width: 734px;
                            min-height: 460px;
                            background: #f7f7f7;
                            left: 210px;
                            border: 1px solid #ddd;
                            top: 0;
                            z-index: 9999 !important;

                            .subitem {
                                float: left;
                                width: 650px;
                                padding: 0 4px 0 8px;

                                dl {
                                    border-top: 1px solid #eee;
                                    padding: 6px 0;
                                    overflow: hidden;
                                    zoom: 1;

                                    &.fore {
                                        border-top: 0;
                                    }

                                    dt {
                                        float: left;
                                        width: 54px;
                                        line-height: 22px;
                                        text-align: right;
                                        padding: 3px 6px 0 0;
                                        font-weight: 700;
                                    }

                                    dd {
                                        float: left;
                                        width: 415px;
                                        padding: 3px 0 0;
                                        overflow: hidden;

                                        em {
                                            float: left;
                                            height: 14px;
                                            line-height: 14px;
                                            padding: 0 8px;
                                            margin-top: 5px;
                                            border-left: 1px solid #ccc;
                                        }
                                    }
                                }
                            }
                        }

                        &.item_on {
                            background-color: mediumvioletred;
                            .item-list {
                                display: block;
                            }
                        }
                    }
                }
            }
        }
    }

</style>
